#include <stdlib.h>
#include <stdio.h>

typedef char DataType;

typedef struct Node 
{
  DataType data;
  struct Node *leftChild;
  struct Node *rightChild;
} BiTreeNode;

extern void create_tree(BiTreeNode** root_pp, char* pre_order_seq, int num_elements);

extern void pre_order_traverse(BiTreeNode* t, void visit(DataType item));

extern void in_order_traverse(BiTreeNode* t, void visit(DataType item));

extern void post_order_traverse(BiTreeNode* t, void visit(DataType item));

extern void visit(DataType item);

extern BiTreeNode* search(BiTreeNode* root, DataType x);

extern void destroy(BiTreeNode** root);
